/****************************************************************
 * I am the AC 130 vs Pirate game. I allow the user to control an 
 * AC130 gunship in the hunt for Modern day pirates. The player  
 * will be allowed to roam free across a section of ocean/coastline.  
 * In the water there will be four types of vessels: Merchant  
 * ships that the player must protect, Pirate ships that the player  
 * must identify and destroy, Fishing boats that look like Pirate  
 * ships that the player must not destroy, and Friendly Navy ships  
 * that can capture pirates for extra points. Time permitting there  
 * may also be ground targets to attack. 
 *
 * Key elements of this project will be the Player/AC130, the Ships,  
 * the ShipAI system, the collision grid, the debris controller, the  
 * Ground/Water, Clouds, and scoring system. This project will make  
 * use of an external text file to store useful game parameters,  
 * thus allowing us to play balance the game without recompiling  
 * the executable. 
 *****************************************************************
 * I am the Building controll class. I am the root container for all
 * Building objects. I have functions that Update and render all the 
 * building objects. I have file reading and writing functions that
 * can be used to load and save builging data for the level. I also
 * store pointers to the GameData and BulletCtrl classes internaly.
 *****************************************************************/

#include "BuildingCtrl.h"
#include <allegro.h>
#include <stdio.h>

/// I am the building control function. I initilize all the 
/// interal data.
BuildingCtrl::BuildingCtrl(){

}

/// I am the destrutor function. I delete all objects created 
/// in the constructor and the initilzer.
BuildingCtrl::~BuildingCtrl(){}

/// I am the initlizer function. I initlize the internal objects 
/// using the GameData. I also store extrenal control objcts like
/// BulletCtrl internaly for use later.
void BuildingCtrl::Init(GameData *exGd, BulletCtrl * exBulletCtrl){
	gd = exGd;
	myBulletCtrl = exBulletCtrl;
		// populate this data with the information stored in exGd
		// see how it is done in the Ground::Init function
	//int maxType;
	//BITMAP * imgAlive[BUILDINGTYPE];
	//BITMAP * imgDead[BUILDINGTYPE];
	//float minRad[BUILDINGTYPE];
	//int maxHp[BUILDINGTYPE];
	//int loyalty[BUILDINGTYPE];
}

/// I am the Building placement funciton. I compute the orietation and
/// angel between the center and modifier points and store that value
/// in to the building at editIndex. The type values is also neccisary
/// to pick which bitmap will be passed along to Building, and its loyalty.
void BuildingCtrl::PlaceBldg(Point * center, Point * modifier, int type){

}

/// I am the read function. I fill the internal building array with
/// data from the file specified by path. I do so in a manner that 
/// matches the data output by the Write function. The path argument 
/// is not the full path but the file name. This function must append
/// the string "data\static\" to the start and a ".txt" to the end
/// this way the controll function can pass the same argument to 
/// Ground::LoadGround as it passes to this. See Ground::LoadGround
/// as to how it is done.
void BuildingCtrl::LoadBuilding(char* path){

}

/// I am the Write function I do the same thing as the LoadBuilding
/// function except saving instead of reading a file.
void BuildingCtrl::SaveBuilding(char* path){

}

/// I am the update function. I update all buildings in this class.
/// I check the Bullet ctrl to see which bullets are dammaging the 
/// buildings.
void BuildingCtrl::Update(){

}
	
/// I am the type picker function. I function, just like the 
/// Ground::TilePicker function, allowing the user to choose
/// they type of building 
int BuildingCtrl::PickType(int screenX, int screenY){
	return 0;// replace with tile picker
}

/// I am the draw function. I render all the buildings in the 
/// screen.
void BuildingCtrl::Draw( Camera * cam){

}

/// I am the companion function to PickType. I Render the
/// all the buildings in a grid. Just like Ground::DrawTilePick
/// I render all the buildings in a grid.
void BuildingCtrl::DrawTypePick( Camera * cam, int curTile){

}